package model

import (
	"cloud-entropy-storage-system/common/pkg/pathdir"
	"github.com/asdine/storm/v3"
	"path"
)

const (
	FlagDelete = iota
	FlagInit
)

func NewDB(dir string, ) (*storm.DB, error) {
	_, err := pathdir.CheckAndMkDir(dir)
	if err != nil {
		return nil, err
	}
	return storm.Open(path.Join(dir, "gofile-server.s3w"))
}
